package com.supers.servlet.utils;

import org.junit.Test;

public class StringUtils {
	
	/**
	 * 解析uri：super-servlet/userAction.action中的userAction
	 * @param uri
	 * @return
	 */
	public static String parse(String uri) {
		String[] ss = uri.split("/") ;
		return ss[ss.length-1].substring(0,ss[ss.length-1].indexOf(".")) ;
	}
	
	@Test
	public void test() {
		String result = StringUtils.parse("super-servlet/userAction.action中的userAction") ;
		System.out.println(result);
	}

}
